/*
 *  thermodamper.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 23/09/2010
 *
 */
 
#ifndef _thermodamper_h_
#define _thermodamper_h_

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "mecsystem.h"
#include "COMPONENTS/td.h"
#include "COMPONENTS/d.h"

class MecSystem;

using namespace std;

class ThermoDamper : public Body
{
public:
	string pointNameA;
	string pointNameB;
	double theta;	// Temperature
	/*	Data members from the base class Body
	 string name;
	 int dim;
	 MecSystem* parentSystem;
	 vector<Component*> vComponents;
	 vector<Component*> vLoads;
	 vector<string> vPointNamesSurface;
	 vector<Point*> vPPointSurface;
	 map<string,int,less<string> > pNamePNumber;
	 string outGraphFilex;
	 ofstream localFGraph;
	 Surface *surface; 
	 string surfName; 
	 bool contactAllOption;	
	 bool contactFileOption;
	 bool contactNamesOption;
	 vector<double> localSystem;	// Global coordinates of body points for ground
	 vector<string> vPointNamesContact; 
	 */
	
public:
	ThermoDamper(){}
	ThermoDamper(ifstream &, string, MecSystem*);
	~ThermoDamper(){}
	
	/** Virtual functions from base */
	void setPTPointsComp();		/** Set pointers to points in each component */
	void setPTPointsLoad();		/** Set pointers to points in each load */
//	void setPTPointsCons();		/** Set pointers to points in each constraint */
//	void setPTBodies();			/** Set pointers to the bodies, based on the list of body names */
	void setPPointSurface();	/** Set pointers to surface points in each component */
	void setMatAtComp();
	void getBoundary(vector<vector<string> >&);
	void writeMSH(ofstream&);		/** MSH format for Gmsh */
	void writeVTU(ofstream&, bool&, bool&, bool&);		/** VTU format for Paraview */
	void writeOOGL(ofstream&);	/** OOGL format for Geomview */
	void writeFileTemp(const double&, ofstream &);
	void setIniPosBody(vector<double>&);
	
	/** Local functions */
	
};

#endif
